package com.zdkj.subway.st.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zdkj.common.core.exceltools.HeaderToColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@ApiModel(value = "车票日计划")
@EqualsAndHashCode(callSuper = true)
@TableName("sw_tk_public_plan_day")
public class SwStPlanDay extends Model<SwStPlanDay> {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "唯一标识")
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "周计划id")
    @ExcelIgnore
    private Long planWeekId;

    @ExcelIgnore
    private Boolean display;

    @ApiModelProperty(value = "作业时间(年)")
    @ExcelProperty(value = "作业时间(年)", index = 0)
    private String workTime;

    @ApiModelProperty(value = "线路编码")
    @ExcelIgnore
    private String lineCode;

    @ApiModelProperty(value = "车站编码")
    @ExcelIgnore
    private String stationCode;

    @ApiModelProperty(value = "月份")
    @HeaderToColumn(header = "月份", index = 1)
    @ExcelProperty(value = "月份", index = 1)
    private String planMonth;

    @ApiModelProperty(value = "周")
    @ExcelProperty(value = "周", index = 2)
    private String planWeek;

    @ApiModelProperty(value = "计划类型")
    @HeaderToColumn(header = "计划类型", index = 2)
    @ExcelIgnore
    private String planType;

    @ApiModelProperty(value = "周期")
    @HeaderToColumn(header = "周期")
    @ExcelIgnore
    private String workCycle;

    @ApiModelProperty(value = "票种")
    @HeaderToColumn(header = "票种", index = 3)
    @ExcelProperty(value = "票种", index = 5)
    private String ticketType;

    @ApiModelProperty(value = "车票名称")
    @ExcelProperty(value = "车票名称", index = 6)
    private String ticketName;

    @ApiModelProperty(value = "票价")
    @ExcelProperty(value = "票价", index = 7)
    private BigDecimal ticketPrice;

    @ApiModelProperty(value = "车票次数")
    @ExcelProperty(value = "车票次数", index = 8)
    private Integer ticketTimes;

    @ApiModelProperty(value = "车票有效期")
    @ExcelProperty(value = "车票有效期", index = 9)
    private String activeTime;

    @ApiModelProperty(value = "车票最晚启动日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "车票最晚启动日期", index = 10)
    private LocalDateTime latestStartTime;

    @ApiModelProperty(value = "张数")
    @ExcelProperty(value = "张数", index = 11)
    private Integer ticketNumber;

    @ApiModelProperty(value = "起号/止号")
    @ExcelProperty(value = "起号/止号", index = 12)
    private String startEndNo;

    @ApiModelProperty(value = "车票用途")
    @ExcelIgnore
    private String ticketPurpose;

    @ApiModelProperty(value = "计划完成时间")
    @HeaderToColumn(header = "计划完成时间", index = 4)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "计划完成时间", index = 3)
    private LocalDateTime planFinishTime;

    @ApiModelProperty(value = "实际完成时间")
    @HeaderToColumn(header = "实际完成时间", index = 5)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "实际完成时间", index = 13)
    private LocalDateTime actualFinishTime;

    @ApiModelProperty(value = "审核状态")
    @HeaderToColumn(header = "审核状态", index = 6)
    @ExcelIgnore
    private String checkStatus;

    @ApiModelProperty(value = "日计划审批状态")
    @ExcelProperty(value = "日计划审批状态", index = 4)
    private String checkApproveStatus;

    @ApiModelProperty(value = "是否完成")
    @HeaderToColumn(header = "是否完成", index = 7)
    @ExcelIgnore
    private String isFinish;

    @ApiModelProperty(value = "未完成原因")
    @HeaderToColumn(header = "未完成原因", index = 8)
    @ExcelIgnore
    private String unfinishReason;

    @ApiModelProperty(value = "备注")
    @ExcelIgnore
    private String remark;

    @ApiModelProperty(value = "实际配送数量")
    @HeaderToColumn(header = "实际配送数量", index = 10)
    @ExcelIgnore
    private Integer distribuNumber;

    @ApiModelProperty(value = "清洗后数量")
    @HeaderToColumn(header = "清洗后数量", index = 11)
    @ExcelIgnore
    private Integer cleanedNumber;

    @ApiModelProperty(value = "折损数量")
    @HeaderToColumn(header = "折损数量", index = 12)
    @ExcelIgnore
    private Integer lossNumber;

    @ApiModelProperty(value = "未清洗数量")
    @ExcelIgnore
    private Integer uncleanNumber;

    @ApiModelProperty(value = "实际回收数量")
    @ExcelIgnore
    private Integer recoveryNumber;

    @ApiModelProperty(value = "有效车票数量")
    @ExcelProperty(value = "有效车票数量", index = 14)
    private Integer effectiveNumber;

    @ApiModelProperty(value = "测试车票数量")
    @ExcelProperty(value = "有效车票数量", index = 15)
    private Integer testNumber;

    @ApiModelProperty(value = "无效车票数量")
    @ExcelProperty(value = "无效车票数量", index = 16)
    private Integer invalidNumber;

    @ApiModelProperty(value = "总数")
    @ExcelProperty(value = "总数", index = 17)
    private Integer totalNumber;

    @ApiModelProperty(value = "差异数量")
    @ExcelIgnore
    private Integer differenceNumber;

    @ApiModelProperty(value = "创建人ID")
    @ExcelIgnore
    private Long creatorId;

    @ApiModelProperty(value = "审核人")
    @ExcelIgnore
    private Integer checkPersonId;

	@ApiModelProperty(value = "审核人名称")
	@ExcelIgnore
	private String checkPersonName;

    @ApiModelProperty(value = "处理人工号")
    @ExcelProperty(value = "处理人工号", index = 19)
    private String personId;

    @ApiModelProperty(value = "处理人")
    @ExcelProperty(value = "处理人", index = 18)
    private String personName;

    @ApiModelProperty(value = "处理人2工号")
    @ExcelProperty(value = "处理人2工号", index = 20)
    private String personTwoId;

    @ApiModelProperty(value = "处理人2")
    @ExcelProperty(value = "处理人2", index = 21)
    private String personTwoName;

    @ApiModelProperty(value = "审批建议")
    @ExcelIgnore
    private String checkSuggest;

    @ApiModelProperty(value = "审批建议")
    @ExcelIgnore
    private String checkSubmit;

    @ApiModelProperty(value = "审核时间")
    @ExcelProperty(value = "审核时间", index = 22)
    private LocalDateTime checkTime;

    @ApiModelProperty(value = "创建人名称")
    @ExcelProperty(value = "创建人名称", index = 23)
    private String creatorName;

    @ApiModelProperty(value = "创建时间")
    @ExcelProperty(value = "创建时间", index = 24)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据来源:0:周计划分解;1:无效票;2:公务票;3:临时计划")
    @ExcelIgnore
    private String dataSource;

    @ApiModelProperty(value = "ES是否获取：默认0：未获取，1：已获取")
    @ExcelIgnore
    private String esIsGet;

    @ApiModelProperty(value = "任务编号")
    @ExcelIgnore
    private String taskNum;

    @ApiModelProperty(value = "计划完成时间用于返回格式 年月日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    @ExcelIgnore
    private LocalDate planFinishDate;

    @ApiModelProperty(value = "起号")
    @TableField(exist = false)
    @ExcelIgnore
    private String beginNum;

    @ApiModelProperty(value = "止号")
    @TableField(exist = false)
    @ExcelIgnore
    private String endNum;

    //es新增字段
    @ApiModelProperty(value = "任务类型:1:票卡初始化任务、2:票卡预赋值任务、3:票卡重编码任务、4:票卡注销任务")
    @ExcelIgnore
    private String taskType;

    @ApiModelProperty(value = "发卡方式: 任务类型2：（00-未初始化票卡预赋值，01-已初始化票卡预赋值），任务类型3：（00-票卡重发行，01-票卡重发行预赋值）")
    @ExcelIgnore
    private String issuingMethod;

    @ApiModelProperty(value = "设备类型（0: JC8200编码设备，1: JC6200D编码设备，2: 个性化打印设备）")
    @ExcelIgnore
    private String esEquipmentType;

    @ApiModelProperty(value = "票卡类型（2: CPU票卡，3: UL票卡）")
    @ExcelIgnore
    private String esTicketType;

    @ApiModelProperty(value = "是否是出厂卡初始化（是，否）")
    @ExcelIgnore
    private String esIsInitialization;

    @ApiModelProperty(value = "应用类型（00-正常，01-测试）")
    @ExcelIgnore
    private String esAppTypes;

    @ApiModelProperty(value = "起始站点（ES站点表）")
    @ExcelIgnore
    private String esStartStation;

    @ApiModelProperty(value = "结束站点（ES站点表）")
    @ExcelIgnore
    private String esEndStation;

    @ApiModelProperty(value = "有效开始日期：年月日")
    @ExcelIgnore
    private LocalDate esStartDate;

    @ApiModelProperty(value = "有效结束日期：年月日")
    @ExcelIgnore
    private LocalDate esEndDate;

    @ApiModelProperty(value = "es产品主类型")
    @ExcelIgnore
    private String productType;

    @ApiModelProperty(value = "es产品子类型")
    @ExcelIgnore
    private String productSubType;

    @ApiModelProperty(value = "es机器ip地址")
    @ExcelIgnore
    private String esIpAddress;

    @ApiModelProperty(value = "设备编号")
    @ExcelIgnore
    private String equipmentNumber;


	@ApiModelProperty(value = "是否操作过出库（1是，0否）")
    @ExcelIgnore
    private String isOutstock;

	@ApiModelProperty(value = "是否操作过入库（1是，0否）")
    @ExcelIgnore
    private String isInstock;


    @ApiModelProperty(value="单号")
    @ExcelIgnore
    private String numbers;

    @ApiModelProperty(value = "运营商")
    @ExcelIgnore
    private String operator;
}
